package edu.osu.cse.c651.cryptochess;

import java.util.ArrayList;

/**
 * A player of a chess match
 * 
 * @author Team Pawned
 * 
 */
public class Player {

	/**
	 * The Color of the Pieces that this Player is using
	 */
	private Color color;

	/**
	 * The Pieces that this Player's opponent has captured from this Player
	 */
	private ArrayList<Piece> capturedPieces;

	/**
	 * Constructor
	 * 
	 * @param color
	 *            the Color of this Player
	 */
	public Player(Color color) {
		this.color = color;
		capturedPieces = new ArrayList<Piece>();
	}

	/**
	 * Adds a Piece to the collection of Pieces that this Player has lost to the
	 * opponent
	 * 
	 * @param piece
	 *            the Piece captured by the opponent
	 */
	public void addCapturedPiece(Piece piece) {
		capturedPieces.add(piece);
	}

	/**
	 * Returns the collection of Pieces that this player has lost to the
	 * opponent Player
	 * 
	 * @return ArrayList<Piece> list of Pieces
	 */
	public ArrayList<Piece> capturedPieces() {
		return capturedPieces;
	}

	/**
	 * The color of this Player
	 * 
	 * @return Color the Color of this Player
	 */
	public Color color() {
		return color;
	}

}
